#ifndef HISTREAMER_PLUGIN_INIF_CODEC_PLUGIN_IN
#define HISTREAMER_PLUGIN_INIF_CODEC_PLUGIN_IN

#include <vector>
#include "plugin_base.h"
#include "plugin_definition.h"
#include "common/plugin_caps.h"

namespace OHOS {
namespace Multimedia {
namespace Plugin {

struct DataCallback {
	virtual void OnInputBufferDone(const std::shard_ptr<Buffer> &input)=0;
	
	virtual void OnOutputBufferDone(const std::shard_ptr<Buffer> &output)=0;
};


struct CodecPlugin : pubilc PluginBase {
	virtual Status QueueInputBuffer(const std::shard_ptr<Buffer> &inputBuffers, int32_t timeoutMs)=0;
	virtual Status QueueOutputBuffer(const std::shard_ptr<Buffer> &outputBuffers, int32_t timeoutMs)=0;
	virtual Status Flush() = 0;
	virtual Status SetDataCallback(const std::weak_ptr<DataCallback &dataCallback>)=0;
};
	
#define CODEC_API_VERSION_MAJOR (1)

#define CODEC_API_VERSION_MINOR (0)

#define CODEC_API_VERSION MAKE_VERSION(CODEC_API_VERSION_MAJOR, CODEC_API_VERSION_MINOR)

enum struct CodecType {
	AUDIO_DECODER,
	AUDIO_ENCODER,
	VIDEO_DECODER,
	VIDEO_ENCODER,
};

struct CodecPluginDef : public pluginDefBase {
	CodeType codecType;
	CapabilitySet inCaps;
	CapabilitySet outCaps;
	PluginCreatorFunc<CodecPlugin> creator;
	CodecPluginDef() {
		apiVersion = CODEC_API_VERSION;
		pluginType = PluginType::CODEC;
	}
};

}//naspace plugin
}//multi
} //ohos
#endif





	
